var member_id = '';
document.addEventListener('plusready',function(){
	member_id = plus.storage.getItem('id');
	var ws = plus.webview.currentWebview();
	var goodsid = ws.goodsid;
	var data = ws.data;
	var info = $.parseJSON(data);
//	console.log(JSON.stringify(info));
//	var data = plus.storage.getItem('data');
//	console.log(JSON.stringify(info));
	var html2 = '';
	$.each(info, function(k, v) {
		if(v.gc_id == goodsid){
			$('.mui-title').text(v.gc_name);
			$('title').text(v.gc_name);
			$.each(v.goods_details, function(key, value) {  
				html2 += '<ul class="mui-table-view Travel" data-id="'+ value.goods_id +'" data-did="'+ value.store_id +'">'+
							'<li class="mui-table-view-cell frien_img">'+
								'<a href="javascript:;">'+
									'<img class="mui-media-object mui-pull-left" src="'+ pics + value.store_id + '/' + value.goods_image +'">'+
									'<div class="mui-media-body">'+																			
										'<div class="mui-ellipsis-2">'+ value.goods_name +'</div>	'+														
										'<b>￥'+ value.goods_price +'</b><p class="botm mui-h6"><span class="mui-pull-right">销量：'+ value.goods_salenum +'</span></p>'+													
									'</div>'+
								'</a>'+
							'</li>'+
						  '</ul>';
			});
		}
		$('.shopping').html(html2);	
	});
	//详情
	$('.Travel').unbind('tap');
	$('.Travel').on('tap',function(){
		var _this = $(this);
		var goodsid = _this.attr('data-id');
		var store_id = _this.attr('data-did');
		var nwaiting = plus.nativeUI.showWaiting();//显示原生等待框
		var webviewContent= plus.webview.create('./Travel_details.html','Travel_details.html',{},{goodsid:goodsid,store_id:store_id});//后台创建webview并打开show.html
		webviewContent.addEventListener("loaded", function() { //注册新webview的载入完成事件
	        nwaiting.close(); //新webview的载入完毕后关闭等待框
	        webviewContent.show("slide-in-right",500); //把新webview窗体显示出来，显示动画效果为速度200毫秒的右侧移入动画
	    }, false);
	})
},false);